Regex

Syntax: @Regex <Search Str>,<Regex Str>,<Return Str Array>|<Return Bool>[,<Modifier Str'img'>]

The Regex command allows searches to be performed using regular expressions. Search Str is searched using the expression Regex Str and either the result is returned in Return Bool or the actual found strings are returned in the Return Str Array. The search can be modifed with the Modifier Str'img' where 'i' makes the regex match case insensitive, 'm' enables multi-line mode (the caret and dollar match before and after newlines in the subject string) and 'g' is used to perform a global match (find all matches rather than stopping after the first match).

Examples

@Regex 'XpertRule Software, Salford, M6 6FP','[A-z][A-z]?[0-9][0-9]?.?[0-9][A-z][A-z]',postcode